import requests

from conf.readconf import ReadConf
import allure

#  实例化类的对象，后面需要用到v部落的url地址，直接调用函数返回
rf = ReadConf()


class TestVlog():
    # @allure.title("测试V部落登录接口")
    # @allure.description("正常登录")
    def test_vlog_login(self):
        datas = {"username": "sang", "password": 123}
        vlog_url = rf.get_vlog("v_url")
        time_out = rf.get_vlog("timeout")
        value = requests.post(vlog_url + "/login", data=datas, timeout=int(time_out))
        #  获取返回的json对象
        response_value = value.json()
        print(response_value)
        # assert response_value['msg'] == '登录成功'
        # assert response_value['status'] == 200


